package demo1;

abstract class Shape {
    public abstract void draw();
}

class Cycle extends Shape{
    @Override
    public void draw() {
        System.out.println("○");
    }
}

abstract class A extends Shape {
    // 一个抽象类继承一个抽象，不需要重写方法
    public abstract void func();
}

class B extends A {
// alt + enter 重写所有方法
    @Override
    public void draw() {

    }

    @Override
    public void func() {

    }
}

class Trangle {
    public void draw() {
        System.out.println("△");
    }
}

public class Test {
    public static void main(String[] args) {
        Shape shape = new Cycle();
    }
}
